import request from '@/utils/request'

export function getDictPageList(params) {
    return request({
      url: '/dict/dictPageList',
      method: 'get',
      params
    })
  }
  export function createDict(data) {
    return request({
      url: '/dict',
      method: 'post',
      data
    })
  }
  export function updateDict(data) {
    return request({
      url: '/dict',
      method: 'put',
      data
    })
  }
//删除字典表
export function deleteDict(id) {
  return request({
    url: `/dict/${id}`,
    method: 'delete',
  })
}
export function dictItemPageList(params) {
  return request({
    url: '/dict/item/PageList',
    method: 'get',
    params
  })
}
//删除字典项
export function deleteDictItem(id) {
  return request({
    url: `/dict/item/${id}`,
    method: 'delete',
  })
}
export function createDictItem(data) {
  return request({
    url: '/dict/item',
    method: 'post',
    data
  })
}
export function updateDictItem(data) {
  return request({
    url: '/dict/item',
    method: 'put',
    data
  })
}